home *** CD-ROM | disk | FTP | other *** search
/ Isometric Game Programming with DirectX 7.0 / Isometric Game Programming.iso / source / chapter10 / isohex10_4 / wavloader.h < prev   
Encoding:
C/C++ Source or Header  |  2000-05-25  |  1008 b   |  53 lines

  1. // WAVLoader.h: interface for the CWAVLoader class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_WAVLOADER_H__599E6162_323E_11D4_A1EE_DFBE7378EC24__INCLUDED_)
  6. #define AFX_WAVLOADER_H__599E6162_323E_11D4_A1EE_DFBE7378EC24__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. #include <windows.h>   
  13. #include "mmsystem.h"
  14. #include "dsound.h"
  15.  
  16. //wave loader class
  17. class CWAVLoader  
  18. {
  19. private:
  20.     //format
  21.     LPWAVEFORMATEX lpWfx;
  22.  
  23.     //data chunk
  24.     UCHAR* ucData;
  25.  
  26.     //length of the data chunk
  27.     DWORD dwDataLength;
  28.  
  29. public:
  30.     //constructor
  31.     CWAVLoader();
  32.  
  33.     //destructor
  34.     ~CWAVLoader();
  35.  
  36.     //get data length
  37.     DWORD GetLength();
  38.  
  39.     //get data pointer
  40.     UCHAR* GetData();
  41.  
  42.     //get pointer to format
  43.     LPWAVEFORMATEX GetFormat();
  44.  
  45.     //load from a file
  46.     void Load(LPCTSTR lpszFilename);
  47.  
  48.     //destroy buffer
  49.     void Destroy();
  50. };
  51.  
  52. #endif // !defined(AFX_WAVLOADER_H__599E6162_323E_11D4_A1EE_DFBE7378EC24__INCLUDED_)
  53.